<?php
session_start();
/*Borrar.php borrara el presupuesto pero mantendr� los datos
 * solo borrara la fila de la tabla presu*/
require_once('include/connection.php');

// $arrayVariable["column name"] = formatted SQL value
$filter["numero"] = '"'.$_POST ["numero"].'"';

// Execute the delete 
$result = $db->DeleteRows("presupuestos", $filter);
// If we have an error
if (!$result) {

    // Show the error and kill the script
    die("error".mysql_error());

}
$filter2["total_id_presu"] = '"'.$_POST["numero"].'"';

// Execute the delete 
$result = $db->DeleteRows("totales", $filter2);
// If we have an error
if (!$result) {

    // Show the error and kill the script
    die("error".mysql_error());

}
$filter3["id_presu"] = '"'.$_POST["numero"].'"';

// Execute the delete 
$result = $db->DeleteRows("clientes", $filter3);
// If we have an error
if (!$result) {

    // Show the error and kill the script
    die("error".mysql_error());

}
// Execute the delete 
$result = $db->DeleteRows("servicios", $filter3);
// If we have an error
if (!$result) {

    // Show the error and kill the script
    die("error".mysql_error());

}
// Execute the delete 
$result = $db->DeleteRows("presu_hardware", $filter3);
// If we have an error
if (!$result) {

    // Show the error and kill the script
    die("error".mysql_error());

}
require_once('include/saveinfo.php');
?>
